package com.handinfo.uimenu;

import com.handinfo.uimenu.window.UIActivity;
import com.handinfo.uimenu.window.UIActorItemDetail;
import com.handinfo.uimenu.window.UIAnnouncement;
import com.handinfo.uimenu.window.UIAttribute;
import com.handinfo.uimenu.window.UIAuctionDetail;
import com.handinfo.uimenu.window.UIAuctionList;
import com.handinfo.uimenu.window.UIAuctionSail;
import com.handinfo.uimenu.window.UIAuctionSearch;
import com.handinfo.uimenu.window.UIAutoAddFriend;
import com.handinfo.uimenu.window.UIAutoHangUp;
import com.handinfo.uimenu.window.UIBag;
import com.handinfo.uimenu.window.UIBattlefieldWindow;
import com.handinfo.uimenu.window.UICaveWorldWindow;
import com.handinfo.uimenu.window.UIChat;
import com.handinfo.uimenu.window.UIChatInsert;
import com.handinfo.uimenu.window.UIChongzhi;
import com.handinfo.uimenu.window.UIDeal;
import com.handinfo.uimenu.window.UIFamilyWindow;
import com.handinfo.uimenu.window.UIFbactivity;
import com.handinfo.uimenu.window.UIGameCarbonWindow;
import com.handinfo.uimenu.window.UIGonglue;
import com.handinfo.uimenu.window.UILearnCollection;
import com.handinfo.uimenu.window.UILifeSkillsWindow;
import com.handinfo.uimenu.window.UIMail;
import com.handinfo.uimenu.window.UIMailList;
import com.handinfo.uimenu.window.UIMain;
import com.handinfo.uimenu.window.UIMarket;
import com.handinfo.uimenu.window.UIMenu;
import com.handinfo.uimenu.window.UIMultiMoney;
import com.handinfo.uimenu.window.UINPCWindow;
import com.handinfo.uimenu.window.UINpcHecheng;
import com.handinfo.uimenu.window.UINpcShop;
import com.handinfo.uimenu.window.UIQianghua;
import com.handinfo.uimenu.window.UIRankingLists;
import com.handinfo.uimenu.window.UISetMarco;
import com.handinfo.uimenu.window.UISetShortCut;
import com.handinfo.uimenu.window.UISetSystem;
import com.handinfo.uimenu.window.UIShowData;
import com.handinfo.uimenu.window.UISkill;
import com.handinfo.uimenu.window.UISkillDetail;
import com.handinfo.uimenu.window.UISocialWindow;
import com.handinfo.uimenu.window.UITaskWindow;
import com.handinfo.uimenu.window.UITeamWindow;
import com.handinfo.uimenu.window.UIWanted;

public class UIWindowFactory
{
	/**
	 * 根据Id创建窗体
	 * 
	 * @param id
	 * @return
	 */
	public static UIAbstractWindow createWindow(int id)
	{
		UIAbstractWindow window = null;
		switch (id) {
			// xia
			case WINDOW_MAIN:
				window = new UIMain(id);
				break;
			// zeng
			case WINDOW_ALERTBOX:
				window = new UIMessageBox(id);
				break;
			case WINDOW_MESSAGEBOX:
				window = new UIMessageBox(id);
				break;
			case WINDOW_MENU:
				window = new UIDialogMenu(id);
				break;
			case WINDOW_POPMENU:
				window = new UIPopmenu(id);
				break;
			case WINDOW_INTERACT:
				window = new UiInteractMenu(id);
				break;
			case WINDOW_DEAL:
				window = new UIDeal(id);
				break;
			case WINDOW_NPCSHOP:
				window = new UINpcShop(id);
				break;
			case WINDOW_BAG:
				window = new UIBag(id);
				break;
			case WINDOW_MAIL:
				window = new UIMail(id);
				break;
			case WINDOW_MAIL_LIST:
				window = new UIMailList(id);
				break;
			case WINDOW_SET_SHORTCUT:
				window = new UISetShortCut(id);
				break;
			case WINDOW_SET_MARCOS:
				window = new UISetMarco(id);
				break;
			case WINDOW_AUCTION_SEARCH:
				window = new UIAuctionSearch(id);
				break;
			case WINDOW_AUCTION_LIST:
				window = new UIAuctionList(id);
				break;
			case WINDOW_ACTOR_DETAIL:
				window = new UIActorItemDetail(id);
				break;
			case WINDOW_AUCTION_SAIL:
				window = new UIAuctionSail(id);
				break;
			case WINDOW_AUCTION_DETAIL:
				window = new UIAuctionDetail(id);
				break;
			case WINDOW_NPCHECHENG:
				window = new UINpcHecheng(id);
				break;
			case WINDOW_QIANGHUA:
				window = new UIQianghua(id);
				break;
			case WINDOW_MENU_LR:
				window = new UIMenu(id);
				break;
			case WINDOW_CHAT:
				window = new UIChat(id);
				break;
			case WINDOW_ATTRIBUTE:
				window = new UIAttribute(id);
				break;
			case WINDOW_SKILL:
				window = new UISkill(id);
				break;
			case WINDOW_SKILLDETAIL:
				window = new UISkillDetail(id);
				break;
			case WINDOW_FACE:
				window = new UIChatInsert(id);
				break;
			case WINDOW_SET_SYSTEM:
				window = new UISetSystem(id);
				break;
			case WINDOW_MARKET:
				window = new UIMarket(id);
				break;
			case WINDOW_CHNGZHI:
				window = new UIChongzhi(id);
				break;
			case WINDOW_MULTIMONEY:
				window = new UIMultiMoney(id);
				break;
			case WINDOW_GONGLUE:
				window = new UIGonglue(id);
				break;
			// xu
			case WINDOW_ID_TEAM: // 队伍窗体
				window = new UITeamWindow(id);
				break;
			case WINDOW_ID_SOCIAL_FRIEND: // 社交窗体
			case WINDOW_ID_SOCIAL_BLACK: // 社交窗体
			case WINDOW_ID_SOCIAL_ENEMY: // 社交窗体
			case WINDOW_ID_DONGFU_GONGFA: //洞府攻伐
				window = new UISocialWindow(id);
				break;
			case WINDOW_ID_SOCIAL_AUTOADDFRIEND:
				window = new UIAutoAddFriend(id);
				break;
			case WINDOW_ID_DONGFU: // 洞府
				window = new UICaveWorldWindow(id);
				break;
			//排行
			case WINDOW_ID_GRADERANK:
				//window = new UIRankingList(id);
				window = new UIRankingLists(id);
				break;
			// D
			case WINDOW_ID_NPC:
				window = new UINPCWindow(id);
				break;
			case WINDOW_ID_TASK:
				window = new UITaskWindow(id);
				break;
			case WINDOW_ID_LIFESKILLS:
				window = new UILifeSkillsWindow(id);
				break;
			case WINDOW_ID_FAMILY:
				window = new UIFamilyWindow(id);
				break;
			case WINDOW_ID_BATTLEFIELD:
				window = new UIBattlefieldWindow(id);
				break;
			case WINDOW_ID_GAMECARBON:
				window = new UIGameCarbonWindow(id);
				break;
			//通缉令 	
			case WINDOW_ID_WANTED:
			case WINDOW_ID_WANTEDMYPUBLISH:
			case WINDOW_ID_WANTEDSEE:
				window = new UIWanted(id);
				break;
			//活动
			case WINDOW_ID_ACTIVITY:
				window = new UIActivity(id);
				break;
			//自动挂机
			case WINDOW_ID_AUTOHANGUP:
				window = new UIAutoHangUp(id);
				break;
			//游戏公告
			case WINDOW_ID_ANNOUNCEMENT:
				window = new UIAnnouncement(id);
				break;
			//NPC采集和遗忘采集
			case WINDOW_ID_COLLECTION:
				window = new UILearnCollection(id);
				break;
			case WINDOW_ID_FBACTIVITY:
				window = new UIFbactivity(id);
				break;
			case WINDOW_SHOWDATA:
				window = new UIShowData(id);
				break;
			default:
				throw new IllegalArgumentException("None id = " + id);
		}
		window.createNotify();
		return window;
	}

	// ////////////////////////////////////////
	// 夏总
	// ////////////////////////////////////////
	public static final int WINDOW_MAIN = 1;
	// ////////////////////////////////////////
	// venizeng
	// ////////////////////////////////////////
	public static final int WINDOW_ALERTBOX = 101;//提示框，废弃
	public static final int WINDOW_MESSAGEBOX = 102;//对话框
	public static final int WINDOW_MENU = 103;//对话菜单框
	public static final int WINDOW_POPMENU = 104;//弹出菜单框
	public static final int WINDOW_INTERACT = 105;//交互对话框
	//
	public static final int WINDOW_DEAL = 301;// 交易界面
	public static final int WINDOW_NPCSHOP = 302;//npc商店
	public static final int WINDOW_BAG = 303;//背包
	public static final int WINDOW_MAIL_LIST = 304;// 邮件列表模块
	public static final int WINDOW_MAIL = 305;// 邮件模块
	public static final int WINDOW_ACTOR_DETAIL = 306;// 道具详情，
	public static final int WINDOW_ACTOR_AUCTION = 307;// 拍卖
	public static final int WINDOW_SET_SHORTCUT = 308;// 快捷栏设置
	public static final int WINDOW_SET_MARCOS = 309;// 宏设置
	public static final int WINDOW_AUCTION_SEARCH = 310;// 拍卖搜索列表
	public static final int WINDOW_AUCTION_LIST = 311;// 拍卖道具选项列表
	public static final int WINDOW_AUCTION_DETAIL = 312;// 拍卖道具详情
	public static final int WINDOW_AUCTION_SAIL = 313;// 拍卖贩卖界面
	public static final int WINDOW_NPCHECHENG = 314;// NPC合成界面
	public static final int WINDOW_QIANGHUA = 315;// NPC强化界面
	public static final int WINDOW_MENU_LR = 501;// 左右软键
	public static final int WINDOW_ATTRIBUTE = 503;// 个人属性
	public static final int WINDOW_SET_SYSTEM = 504;// 系统设置
	public static final int WINDOW_SKILL = 505;// 技能
	public static final int WINDOW_SKILLDETAIL = 506;// 技能详情
	public static final int WINDOW_CHAT = 507;// 聊天
	public static final int WINDOW_FACE = 508;//聊天输入表情
	public static final int WINDOW_MARKET = 509;// 商城
	public static final int WINDOW_CHNGZHI = 510;// 充值
	public static final int WINDOW_MULTIMONEY = 511;// 多币种购买道具，任务，功能等
	public static final int WINDOW_GONGLUE = 512;//战功
	public static final int WINDOW_SHOWDATA = 513;
	// ////////////////////////////////////////
	// d
	// ////////////////////////////////////////
	public static final int WINDOW_ID_NPC = 900;// NPC
	public static final int WINDOW_ID_TASK = 901;// 任务
	public static final int WINDOW_ID_LIFESKILLS = 902;// 生活技能
	// public static final int WINDOW_ID_CAVEWORLD = 903;// 洞府
	public static final int WINDOW_ID_FAMILY = 904;// 家族
	public static final int WINDOW_ID_BATTLEFIELD = 905;//战场
	public static final int WINDOW_ID_GAMECARBON = 906;//副本

	// ////////////////////////////////////////
	// xjp
	// ////////////////////////////////////////
	public static final int WINDOW_ID_TEAM = 601; // 队伍

	public static final int WINDOW_ID_SOCIAL_FRIEND = 610;// 社交好友
	public static final int WINDOW_ID_SOCIAL_BLACK = 611; // 黑名单
	public static final int WINDOW_ID_SOCIAL_ENEMY = 612; // 仇敌
	public static final int WINDOW_ID_SOCIAL_AUTOADDFRIEND = 618; //系统自动添加好友
	public static final int WINDOW_ID_DONGFU_GONGFA = 626; //洞府攻伐界面
	public static final int WINDOW_ID_DONGFU = 621; // 洞府
	/////////////////////排行///////////////////////////////
	public static final int WINDOW_ID_GRADERANK = 630; // 等级排行

	// ////////////////////////////////////////
	// kamizhao
	// ////////////////////////////////////////
	public static final int WINDOW_ID_WANTED = 801; // 通缉令
	public static final int WINDOW_ID_WANTEDSEE = 802;// （查看信息）
	public static final int WINDOW_ID_WANTEDMYPUBLISH = 803;// （我的发布）
	public static final int WINDOW_ID_ACTIVITY = 804;//(活动)
	
    public static final int WINDOW_ID_AUTOHANGUP = 8090891;//(自动挂机)
    public static final int WINDOW_ID_OPEN_BUY_TWO = 8090892;//(购买双倍)

	public static final int WINDOW_ID_ANNOUNCEMENT = 805;//游戏公告
	public static final int WINDOW_ID_COLLECTION = 806;//学习采集

	public static final int WINDOW_ID_FBACTIVITY = 807;//副本活动

	public static final int[] WINDOW_SMALL_IDS = { WINDOW_MAIN, WINDOW_ALERTBOX, WINDOW_MESSAGEBOX, WINDOW_MENU,
			WINDOW_POPMENU, WINDOW_INTERACT, WINDOW_MENU_LR };

}
